//-----------------------------------------------------------------------------
//----- ModifyEnt.h : Declaration of the CModifyEnt
//-----------------------------------------------------------------------------
#pragma once

#ifndef  _MODIFYENT_H_
#define _MODIFYENT_H_
#endif

//-----------------------------------------------------------------------------
#include "adui.h"

//-----------------------------------------------------------------------------
namespace CModifyEnt 
{
	Acad::ErrorStatus SetColorIndex(const AcDbObjectId & entId, Adesk::UInt16 colorIndex=0);
	Acad::ErrorStatus SetColor(const AcDbObjectId & entId, const AcCmColor & color);
	Acad::ErrorStatus SetTrueColor(const AcDbObjectId & entId, BYTE R,BYTE G,BYTE B);
	Acad::ErrorStatus SetTrueColor(AcDbEntity * pEnt,BYTE R,BYTE G,BYTE B);
	Acad::ErrorStatus ChangeLayer(const AcDbObjectId & entId, LPCTSTR strLayerName);
	Acad::ErrorStatus ChangeLinetype(const AcDbObjectId & entId, LPCTSTR strLinetype);
	Acad::ErrorStatus Rotate(const AcDbObjectId & entId,const AcGePoint3d & ptBase,double rotation);
	Acad::ErrorStatus Move(const AcDbObjectId & entId, const AcGePoint3d & ptBase,const AcGePoint3d & ptDest);
	Acad::ErrorStatus Scale(const AcDbObjectId & entId,const AcGePoint3d & ptBase, double scaleFactor);
	Acad::ErrorStatus breakCurve(AcDbCurve* curve, const AcGePoint3d & p1, const AcGePoint3d & p2);
	Acad::ErrorStatus erase(AcDbObjectId & obj);
	Acad::ErrorStatus eraseObjs(vector<AcDbObjectId> & objs);
	Acad::ErrorStatus switchLayer(AcDbObjectId id,bool isOff = false);
	Acad::ErrorStatus switchLayer(CString layerName,bool isOff = false);
	AcDbObjectId  PostToModelSpace(AcDbEntity* pEnt,bool closeIt = true);
	AcDbObjectId  PostToCurrentSpace(AcDbEntity* pEnt,bool closeIt = true,AcDbDatabase * db = acdbCurDwg());
	AcDbObjectId  PostToSpace(AcDbEntity* pEnt,AcDbObjectId spaceId, bool closeIt = true);
} ;
